layui.define(['jquery'], function(exports) {
	var $ = layui.jquery;

	var checkbox = function() {
		var that = this;
		that.name = "复选框";
		that.createNode = function() {
			var html = '<label class="layui-form-label">复选框</label>'+
						'<div class="layui-input-block">'+
							'<input type="checkbox" name="like[write]" title="写作" checked>'+
							'<input type="checkbox" name="like[read]" title="阅读">'+
							'<input type="checkbox" name="like[dai]" title="发呆">'+
						'</div>';
			var ctrlDiv = document.createElement("div");
			ctrlDiv.className = "layui-form-item ays-ctrl";
			ctrlDiv.innerHTML = html;
			that.control = ctrlDiv;
			return ctrlDiv;
		}
	}

	exports('checkbox', {
		create: function() {
			return new checkbox()
		}
	});
});
